home *** CD-ROM | disk | FTP | other *** search
/ MPEG Toolkit / MPEG Toolkit.iso / win / med-lib / mdctrl.z / MDCFUNC.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-07  |  38.8 KB  |  741 lines

  1. /* ********************************************************************** */
  2. /* ***                 Name: mdCFunc.c                                *** */
  3. /* ***                 (c) 1993, 1994, 1995 MediaDynamics Inc.        *** */
  4. /* ***                                                                *** */
  5. /* ***                                                                *** */
  6. /* ***                                                                *** */
  7. /* ***                   ___              ___                         *** */
  8. /* ***                  |   \            /   |                        *** */
  9. /* ***                  |    \          /    |                        *** */
  10. /* ***                  |     \        /     |                        *** */
  11. /* ***                  |      \   __ /___   |                        *** */
  12. /* ***                  |  |\   \ |       |  |\                       *** */
  13. /* ***                  |  | \   \|  -----|  | \                      *** */
  14. /* ***                  |  |  \   \/   /  |  |  \                     *** */
  15. /* ***                  |  |   \      /   |  |\  \                    *** */
  16. /* ***                  |  |    \    /    |  | |  |                   *** */
  17. /* ***                  |  |     \  /|    |  | |  |                   *** */
  18. /* ***                  |__|      \/ |    |__| |  |                   *** */
  19. /* ***                            |  |         |  |                   *** */
  20. /* ***                            |  |        /  /                    *** */
  21. /* ***                            |  |-------/  /                     *** */
  22. /* ***                            |____________/                      *** */
  23. /* ***                                                                *** */
  24. /* ***                                                                *** */
  25. /* ***                                                                *** */
  26. /* ***                                                                *** */
  27. /* ********************************************************************** */
  28.  
  29.  
  30. /* ********************************************************************** */
  31. /* ***                                                                *** */
  32. /* *** NOTICE  NOTICE  NOTICE  NOTICE  NOTICE  NOTICE  NOTICE  NOTICE *** */
  33. /* ***                                                                *** */
  34. /* ***  (C) Copyright MediaDynamics Inc. 1995.  All rights reserved.  *** */
  35. /* ***                                                                *** */
  36. /* ***  You have a royalty-free right to use these sample files as    *** */
  37. /* ***  long as the resulting application is in a compiled (runtime)  *** */
  38. /* ***  form.  You do not have the right to redistribute source code  *** */
  39. /* ***  within your product or application without the express        *** */
  40. /* ***  written consent of MediaDynamics Inc.                         *** */
  41. /* ***                                                                *** */
  42. /* ********************************************************************** */
  43.  
  44. #include <Windows.h>
  45.  
  46. #define MD_VERSION_BASE     0x0300L
  47.                     
  48. // VB control handle definition
  49. typedef LPVOID HCTL;
  50.  
  51.  
  52. #ifdef MDMAIN
  53.  
  54. //long far * lpFarPtr;
  55.  
  56. /* ********************************************************************** */
  57. /* ***      Prototypes:      Control Functions   (16)                 *** */ 
  58. /* ********************************************************************** */
  59. int   ( WINAPI * mdOpen             ) ( HWND hwnd, LPSTR lpszFileName,    // Window Handle and filename
  60.                                         int nX, int nY,                // Positioning
  61.                                         int nW, int nH,                // and size
  62.                                         DWORD dwBeg, long lEnd,        // Begin and end frames
  63.                                         int nType, BOOL bPreload );    // Control Type and display
  64.  
  65. int   ( WINAPI * mdOpenLite         ) ( HWND hwnd, LPSTR lpszFileName, int nX, int nY, BOOL bCtrl );
  66.                                      
  67. int   ( WINAPI * mdClose            ) ( int nDevHandle );
  68. void  ( WINAPI * mdPlay             ) ( int nDevHandle, BOOL bMakeModal );
  69. void  ( WINAPI * mdPause            ) ( int nDevHandle );
  70. void  ( WINAPI * mdStep             ) ( int nDevHandle );
  71. void  ( WINAPI * mdStop             ) ( int nDevHandle );
  72.  
  73. void  ( WINAPI * mdGotoFrame        ) ( int nDevHandle, DWORD dwNewFrame );
  74. void  ( WINAPI * mdRewind           ) ( int nDevHandle );
  75. void  ( WINAPI * mdRestart          ) ( int nDevHandle );
  76.  
  77. int   ( WINAPI * mdOpenDevice       ) ( LPSTR lpszDevice );
  78. int   ( WINAPI * mdCloseDevice      ) ( LPSTR lpszDevice );
  79.  
  80.  
  81. /* ********************************************************************** */
  82. /* ***      Prototypes:      Custom Control Functions  (4)            *** */ 
  83. /* ********************************************************************** */
  84. int   ( WINAPI * mdCloseInterface   ) ( int nInterfaceNo );
  85. int   ( WINAPI * mdOpenInterface    ) ( LPSTR lpszBMFileName, LPSTR lpszBMPosInfoFileName );
  86. int   ( WINAPI * mdGetButtonClicked ) ( int nDevHandle );
  87. int   ( WINAPI * mdSetInterfaceNo   ) ( int nInterfaceNo );
  88.  
  89.  
  90. /* ********************************************************************** */
  91. /* ***      Prototypes:      Visual Basic Specific (1)                *** */ 
  92. /* ********************************************************************** */
  93. int   ( WINAPI * mdVBVOpen          ) ( HWND hwnd, LPSTR lpszFileName, int nX, int nY, int nW, int nH, DWORD dwBeg, long lEnd, BOOL bShowControl );
  94.  
  95.  
  96. /* ********************************************************************** */
  97. /* ***      Prototypes:      Window Control Functions   (6)           *** */ 
  98. /* ********************************************************************** */
  99. void  ( WINAPI * mdHide       ) ( int nDevHandle );
  100. void  ( WINAPI * mdShow       ) ( int nDevHandle );
  101. void  ( WINAPI * mdHideVideo  ) ( int nDevHandle );
  102. void  ( WINAPI * mdShowVideo  ) ( int nDevHandle );
  103. void  ( WINAPI * mdHideCtrl   ) ( int nDevHandle );
  104. void  ( WINAPI * mdShowCtrl   ) ( int nDevHandle );
  105.  
  106.  
  107. /* ********************************************************************** */
  108. /* ***      Prototypes: Parameter Setting Functions  (26)             *** */ 
  109. /* ********************************************************************** */
  110. void ( WINAPI * mdSetClip              ) ( int nDevHandle, DWORD dwBeg, DWORD dwEnd );
  111.  
  112. void ( WINAPI * mdSetWinPos            ) ( int nDevHandle, int XPos, int YPos );
  113. void ( WINAPI * mdSetWinSize           ) ( int nDevHandle, int Width, int Height );
  114.  
  115. void ( WINAPI * mdSetVideoWinPos       ) ( int nDevHandle, int XPos, int YPos );
  116. void ( WINAPI * mdSetVideoWinSize      ) ( int nDevHandle, int Width, int Height );
  117.  
  118. void ( WINAPI * mdSetCtrlWinPos        ) ( int nDevHandle, int XPos, int YPos );
  119. void ( WINAPI * mdSetCtrlWinSize       ) ( int nDevHandle, int Width );
  120.  
  121. void ( WINAPI * mdSetWindowMoveable    ) ( int nDevHandle, BOOL bMoveFlag );
  122. void ( WINAPI * mdSetWindowInteractive ) ( int nDevHandle, BOOL bInterFlag );
  123.  
  124. void ( WINAPI * mdSetAudioLevel        ) ( int nDevHandle, int nLevel );
  125. void ( WINAPI * mdSetAudioMute         ) ( int nDevHandle );
  126.  
  127. void ( WINAPI * mdSetCtrlType          ) ( int nDevHandle, int nType );
  128.                                                                              
  129. void ( WINAPI * mdSetWinBottom         ) ( int nDevHandle );
  130. void ( WINAPI * mdSetWinTop            ) ( int nDevHandle );
  131. void ( WINAPI * mdSetNewParent         ) ( int nDevHandle, HWND hwndNewParent );
  132.  
  133. void ( WINAPI * mdSetClippingRegion    ) ( int nDevHandle, int nXIn, int nYIn, int nWidthIn, int nHeightIn, int nDisplayFlag );
  134.  
  135. void ( WINAPI * mdSetVideoWindowAspect ) ( int nDevHandle );
  136. void ( WINAPI * mdSetVideoAspect       ) ( int nXIn, int nYIn, int nWidthIn, int nHeightIn, int nJustify, BOOL bLimit );
  137. void ( WINAPI * mdSetVideoOffset       ) ( int nDevHandle, int nRight, int nDown );
  138.  
  139. void ( WINAPI * mdSetVideoPalette      ) ( BOOL bPalFlag );
  140. void ( WINAPI * mdSetKeyColor          ) ( int nRColor, int nGColor, int nBColor );
  141.  
  142. void ( WINAPI * mdSetPlaybackSpeed     ) ( int nDevHandle, int nRate );
  143.  
  144. BOOL ( WINAPI * mdSetActivePalette     ) ( LPSTR lpszActivePaletteFile );
  145.  
  146. BOOL ( WINAPI * mdSetPlayRepeat        ) ( int nDevHandle, BOOL bRepeatFlag );
  147.  
  148. void ( WINAPI * mdSetTimeFormat        ) ( int nDevHandle, int nTimeFormat );
  149.  
  150. int  ( WINAPI * mdSetParamDirect       ) ( int nDevHandle, int nIndex, long lValue );
  151.  
  152.  
  153. /* ********************************************************************** */
  154. /* ***      Prototypes:   Information Functions   (43)                *** */ 
  155. /* ********************************************************************** */
  156. int   ( WINAPI * mdGetFileType         ) ( int nDevHandle );
  157. HWND  ( WINAPI * mdGetWindowHandle     ) ( int nDevHandle );       
  158. HWND  ( WINAPI * mdGetCtrlWindowHandle ) ( int nDevHandle );
  159. WORD  ( WINAPI * mdGetDeviceId         ) ( int nDevHandle );
  160. DWORD ( WINAPI * mdGetFrame            ) ( int nDevHandle );
  161. DWORD ( WINAPI * mdGetClipFrame        ) ( int nDevHandle );
  162.  
  163. DWORD ( WINAPI * mdGetLength           ) ( int nDevHandle );
  164. DWORD ( WINAPI * mdGetClipLength       ) ( int nDevHandle );
  165.  
  166. int   ( WINAPI * mdGetPlayState        ) ( int nDevHandle );
  167. int   ( WINAPI * mdGetDisplayState     ) ( int nDevHandle );
  168.  
  169. // The following use integer pointers
  170. void  ( WINAPI * mdGetWinPos           ) ( int nDevHandle, int far * XPos, int far * YPos );
  171. void  ( WINAPI * mdGetWinSize          ) ( int nDevHandle, int far * Width, int far * Height );
  172.  
  173. void  ( WINAPI * mdGetVideoWinPos      ) ( int nDevHandle, int far * XPos, int far * YPos );
  174. void  ( WINAPI * mdGetVideoWinSize     ) ( int nDevHandle, int far * Width, int far * Height );
  175.  
  176. void  ( WINAPI * mdGetCtrlWinPos       ) ( int nDevHandle, int far * XPos, int far * YPos );
  177. void  ( WINAPI * mdGetCtrlWinSize      ) ( int nDevHandle, int far * Width );
  178. // ************************************
  179.  
  180. int   ( WINAPI * mdGetWinX             ) ( int nDevHandle );
  181. int   ( WINAPI * mdGetWinY             ) ( int nDevHandle );
  182. int   ( WINAPI * mdGetWinWidth         ) ( int nDevHandle );
  183. int   ( WINAPI * mdGetWinHeight        ) ( int nDevHandle );
  184.  
  185. int   ( WINAPI * mdGetVideoWinX        ) ( int nDevHandle );
  186. int   ( WINAPI * mdGetVideoWinY        ) ( int nDevHandle );
  187. int   ( WINAPI * mdGetVideoWinWidth    ) ( int nDevHandle );
  188. int   ( WINAPI * mdGetVideoWinHeight   ) ( int nDevHandle );
  189.  
  190. int   ( WINAPI * mdGetCtrlWinX         ) ( int nDevHandle );
  191. int   ( WINAPI * mdGetCtrlWinY         ) ( int nDevHandle );
  192. int   ( WINAPI * mdGetCtrlWinWidth     ) ( int nDevHandle );
  193.  
  194. int   ( WINAPI * mdGetAreaClicked      ) ( int nDevHandle );  
  195.  
  196. int   ( WINAPI * mdGetOpenFileCount    ) ( void );
  197.                                                                        
  198. int   ( WINAPI * mdGetFrameRate        ) ( int nDevHandle );
  199.  
  200. int   ( WINAPI * mdGetPlayedStatus     ) ( int nDevHandle );
  201.  
  202. int   ( WINAPI * mdGetVolumeLevel      ) ( int nDevHandle );
  203.  
  204. int   ( WINAPI * mdGetVideoImage       ) ( int nDevHandle, LPSTR lpszFileName );
  205.  
  206. void  ( WINAPI * mdGetOrigVideoWinSize ) ( int nDevHandle, int far * Width, int far * Height );
  207.  
  208. int   ( WINAPI * mdGetFileName         ) ( int nDevHandle, LPSTR lpszFileName, int nMaxLen );
  209.  
  210. long  ( WINAPI * mdGetFramesSkipped    ) ( int nDevHandle );
  211.  
  212. void  ( WINAPI * mdGetClipFrames       ) ( int nDevHandle, DWORD far * lpBegFrame, DWORD far * lpEndFrame );
  213.  
  214. void  ( WINAPI * mdGetPosClicked       ) ( int nDevHandle, LPINT lpnXPos, LPINT lpnYPos );
  215. int   ( WINAPI * mdGetXPosClicked      ) ( int nDevHandle );
  216. int   ( WINAPI * mdGetYPosClicked      ) ( int nDevHandle );
  217.  
  218. long  ( WINAPI * mdGetVersion          ) ( void );
  219.  
  220. BOOL  ( WINAPI * mdGetVideoPalette     ) ( void );
  221.  
  222. /* ********************************************************************** */
  223. /* ***   Prototypes:   Graphic Loading and Displaying Functions (7)   *** */ 
  224. /* ********************************************************************** */
  225. int   ( WINAPI * mdShowGraphic       ) ( int nDevHandle, BOOL bUsePalette );
  226. int   ( WINAPI * mdShowGraphicPos    ) ( int nDevHandle, int nXPosIn, int nYPosIn, int nWidthIn, int nHeightIn, BOOL bUsePalette );
  227. int   ( WINAPI * mdOpenGraphic       ) ( int nDevHandle, LPSTR FileNameIn );
  228. int   ( WINAPI * mdOpenGraphicKeep   ) ( int nDevHandle, LPSTR FileNameIn );
  229. void  ( WINAPI * mdCloseGraphic      ) ( int nDevHandle );
  230. void  ( WINAPI * mdHideGraphic       ) ( int nDevHandle );
  231. BOOL  ( WINAPI * mdDisplayGraphic    ) ( int nDevHandle, LPSTR lpszBMFileNameIn, int nX, int nY, BOOL bUsePalette );
  232.  
  233.  
  234. /* ********************************************************************** */
  235. /* ***      Prototypes:   Cursor Setting Functions  (6)               *** */ 
  236. /* ********************************************************************** */
  237. void ( WINAPI * mdSetCursor          ) ( int nCursorNo );
  238. void ( WINAPI * mdSetVideoCursor     ) ( int nCursorNo );
  239. void ( WINAPI * mdSetCtrlCursor      ) ( int nCursorNo );
  240. void ( WINAPI * mdResetCursor        ) ( void );
  241. void ( WINAPI * mdResetVideoCursor   ) ( void );
  242. void ( WINAPI * mdResetCtrlCursor    ) ( void );
  243.  
  244.  
  245. /* ********************************************************************** */
  246. /* ***      Prototypes: Miscellaneous Functions (9)                   *** */ 
  247. /* ********************************************************************** */
  248. void  ( WINAPI * mdTimedDelay       ) ( float fSeconds );
  249. BOOL  ( WINAPI * mdFileDoesNotExist ) ( LPSTR lpszFileToCheck );
  250. BOOL  ( WINAPI * mdFileDoesExist    ) ( LPSTR lpszFileToCheck );
  251. void  ( WINAPI * mdDisplayErrorMsgs ) ( BOOL bErrMsgFlag );
  252. void  ( WINAPI * mdAbout            ) ( void );
  253. DWORD ( WINAPI * mdMCISendString    ) ( int nDevHandle, LPSTR lpszSendString );
  254. int   ( WINAPI * mdCDEject          ) ( void );    
  255.  
  256. BOOL  ( WINAPI * mdSetupPlayStateCallback    ) ( HCTL hctl, int hVidHandle, FARPROC vbvFirePlayStateEvent );
  257. BOOL  ( WINAPI * mdSetupCustBtnClickCallback ) ( int hVidHandle, FARPROC vbvFireCustBtnClickEvent );
  258.  
  259.  
  260. /* ********************************************************************** */
  261. /* ***      Prototypes:   Audio Record Procedures  (5)                *** */ 
  262. /* ********************************************************************** */
  263. DWORD ( WINAPI * mdWaveRecordInit)      ( void );
  264. DWORD ( WINAPI * mdWaveClose)           ( void );
  265. DWORD ( WINAPI * mdWaveRecord)          ( DWORD dwMilliSeconds, BOOL bModal );
  266. DWORD ( WINAPI * mdWaveRecordSave)      ( LPSTR lpszFileName );
  267. DWORD ( WINAPI * mdWaveRecordPlayback)  ( void );
  268.  
  269.  
  270. /* ********************************************************************** */
  271. /* ***      Prototypes:     Secure A/V Functions  (3)                 *** */ 
  272. /* ********************************************************************** */
  273. BOOL ( WINAPI * mdRemoveAllSecureAVDrivers ) ( void );
  274. int  ( WINAPI * mdInstallSecureAVDriver    ) ( LPSTR lpszFileExt, LONG lKeyValue1, LONG lKeyValue2 );
  275. int  ( WINAPI * mdRemoveSecureAVDriver     ) ( LPSTR lpszFileExt );
  276.  
  277. /* ********************************************************************** */
  278. /* ***      Prototypes:     Error Handling  (3)                       *** */ 
  279. /* ********************************************************************** */
  280. int  ( WINAPI * mdGetErrorNumber   ) ( int nDevHandle, int nInfoNo );
  281. void ( WINAPI * mdGetErrorText     ) ( int nErrorNo, LPSTR lpszStringOut, int nStringLen );
  282. int  ( WINAPI * mdLogErrors        ) ( LPSTR lpszErrorLogFileName, BOOL bLogErrors );
  283.  
  284. /* ********************************************************************** */
  285. /* ***      Prototypes:     Forced Shutdown/Load  (2)                 *** */ 
  286. /* ********************************************************************** */
  287. int ( WINAPI * mdCloseLibrary) ( void ); 
  288. int ( WINAPI * mdOpenLibrary ) ( void );
  289.   
  290. HINSTANCE mhInstMDCtrl;
  291.  
  292. #else                                 
  293.  
  294. //extern long far * lpFarPtr;
  295. /* ********************************************************************** */
  296. /* ***      Prototypes:      Control Functions   (17)                 *** */ 
  297. /* ********************************************************************** */
  298. extern int   ( WINAPI * mdOpen              ) ( HWND hwnd, LPSTR lpszFileName,    // Window Handle and filename
  299.                                                 int nX, int nY,                // Positioning
  300.                                                 int nW, int nH,                // and size
  301.                                                 DWORD dwBeg, long lEnd,        // Begin and end frames
  302.                                                 int nType, BOOL bPreload );    // Control Type and display
  303.  
  304. extern int   ( WINAPI * mdOpenLite          ) ( HWND hwnd, LPSTR lpszFileName, int nX, int nY, BOOL bCtrl );
  305.                                      
  306. extern int   ( WINAPI * mdClose             ) ( int nDevHandle );
  307. extern void  ( WINAPI * mdPlay              ) ( int nDevHandle, BOOL bMakeModal );
  308. extern void  ( WINAPI * mdPause             ) ( int nDevHandle );
  309. extern void  ( WINAPI * mdStep              ) ( int nDevHandle );
  310. extern void  ( WINAPI * mdStop              ) ( int nDevHandle );
  311.  
  312. extern void  ( WINAPI * mdGotoFrame         ) ( int nDevHandle, DWORD dwNewFrame );
  313. extern void  ( WINAPI * mdRewind            ) ( int nDevHandle );
  314. extern void  ( WINAPI * mdRestart           ) ( int nDevHandle );
  315.  
  316. extern int   ( WINAPI * mdCloseInterface    ) ( int nInterfaceNo );
  317. extern int   ( WINAPI * mdOpenInterface     ) ( LPSTR lpszBMFileName, LPSTR lpszBMPosInfoFileName );
  318. extern int   ( WINAPI * mdGetButtonClicked  ) ( int nDevHandle );
  319. extern int   ( WINAPI * mdSetInterfaceNo    ) ( int nInterfaceNo );
  320.  
  321. extern int   ( WINAPI * mdVBVOpen           ) ( HWND hwnd, LPSTR lpszFileName, int nX, int nY, int nW, int nH, DWORD dwBeg, long lEnd, BOOL bShowControl );
  322.  
  323. extern int   ( WINAPI * mdOpenDevice        ) ( LPSTR lpszDevice );
  324. extern int   ( WINAPI * mdCloseDevice       ) ( LPSTR lpszDevice );
  325.  
  326. /* ********************************************************************** */
  327. /* ***      Prototypes:      Window Control Functions   (6)           *** */ 
  328. /* ********************************************************************** */
  329. extern void  ( WINAPI * mdHide       ) ( int nDevHandle );
  330. extern void  ( WINAPI * mdShow       ) ( int nDevHandle );
  331. extern void  ( WINAPI * mdHideVideo  ) ( int nDevHandle );
  332. extern void  ( WINAPI * mdShowVideo  ) ( int nDevHandle );
  333. extern void  ( WINAPI * mdHideCtrl   ) ( int nDevHandle );
  334. extern void  ( WINAPI * mdShowCtrl   ) ( int nDevHandle );
  335.  
  336.  
  337. /* ********************************************************************** */
  338. /* ***      Prototypes: Parameter Setting Functions  (26)             *** */ 
  339. /* ********************************************************************** */
  340. extern void ( WINAPI * mdSetClip              ) ( int nDevHandle, DWORD dwBeg, DWORD dwEnd );
  341.  
  342. extern void ( WINAPI * mdSetWinPos            ) ( int nDevHandle, int XPos, int YPos );
  343. extern void ( WINAPI * mdSetWinSize           ) ( int nDevHandle, int Width, int Height );
  344.  
  345. extern void ( WINAPI * mdSetVideoWinPos       ) ( int nDevHandle, int XPos, int YPos );
  346. extern void ( WINAPI * mdSetVideoWinSize      ) ( int nDevHandle, int Width, int Height );
  347.  
  348. extern void ( WINAPI * mdSetCtrlWinPos        ) ( int nDevHandle, int XPos, int YPos );
  349. extern void ( WINAPI * mdSetCtrlWinSize       ) ( int nDevHandle, int Width );
  350.  
  351. extern void ( WINAPI * mdSetWindowMoveable    ) ( int nDevHandle, BOOL bMoveFlag );
  352. extern void ( WINAPI * mdSetWindowInteractive ) ( int nDevHandle, BOOL bInterFlag );
  353.  
  354. extern void ( WINAPI * mdSetAudioLevel        ) ( int nDevHandle, int nLevel );
  355. extern void ( WINAPI * mdSetAudioMute         ) ( int nDevHandle );
  356.  
  357. extern void ( WINAPI * mdSetCtrlType          ) ( int nDevHandle, int nType );
  358.                                                                              
  359. extern void ( WINAPI * mdSetWinBottom         ) ( int nDevHandle );
  360. extern void ( WINAPI * mdSetWinTop            ) ( int nDevHandle );
  361. extern void ( WINAPI * mdSetNewParent         ) ( int nDevHandle, HWND hwndNewParent );
  362.  
  363. extern void ( WINAPI * mdSetClippingRegion    ) ( int nDevHandle, int nXIn, int nYIn, int nWidthIn, int nHeightIn, int nDisplayFlag );
  364.  
  365. extern void ( WINAPI * mdSetVideoWindowAspect ) ( int nDevHandle );
  366. extern void ( WINAPI * mdSetVideoAspect       ) ( int nXIn, int nYIn, int nWidthIn, int nHeightIn, int nJustify, BOOL bLimit );
  367. extern void ( WINAPI * mdSetVideoOffset       ) ( int nDevHandle, int nRight, int nDown );
  368.  
  369. extern void ( WINAPI * mdSetVideoPalette      ) ( BOOL bPalFlag );
  370. extern void ( WINAPI * mdSetKeyColor          ) ( int nRColor, int nGColor, int nBColor );
  371.  
  372. extern void ( WINAPI * mdSetPlaybackSpeed     ) ( int nDevHandle, int nRate );
  373.  
  374. extern BOOL ( WINAPI * mdSetActivePalette     ) ( LPSTR lpszActivePaletteFile );
  375.  
  376. extern BOOL ( WINAPI * mdSetPlayRepeat        ) ( int nDevHandle, BOOL bRepeatFlag );
  377.  
  378. extern void ( WINAPI * mdSetTimeFormat        ) ( int nDevHandle, int nTimeFormat );
  379.  
  380. extern int  ( WINAPI * mdSetParamDirect       ) ( int nDevHandle, int nIndex, long lValue );
  381.  
  382.  
  383. /* ********************************************************************** */
  384. /* ***      Prototypes:   Information Functions   (43)                *** */ 
  385. /* ********************************************************************** */
  386. extern int   ( WINAPI * mdGetFileType         ) ( int nDevHandle );
  387. extern HWND  ( WINAPI * mdGetWindowHandle     ) ( int nDevHandle );  
  388. extern HWND  ( WINAPI * mdGetCtrlWindowHandle ) ( int nDevHandle );
  389. extern WORD  ( WINAPI * mdGetDeviceId         ) ( int nDevHandle );
  390. extern DWORD ( WINAPI * mdGetFrame            ) ( int nDevHandle );
  391. extern DWORD ( WINAPI * mdGetClipFrame        ) ( int nDevHandle );
  392.  
  393. extern DWORD ( WINAPI * mdGetLength           ) ( int nDevHandle );
  394. extern DWORD ( WINAPI * mdGetClipLength       ) ( int nDevHandle );
  395.  
  396. extern int   ( WINAPI * mdGetPlayState        ) ( int nDevHandle );
  397. extern int   ( WINAPI * mdGetDisplayState     ) ( int nDevHandle );
  398.  
  399. // The following use integer pointers
  400. extern void  ( WINAPI * mdGetWinPos           ) ( int nDevHandle, int far * XPos, int far * YPos );
  401. extern void  ( WINAPI * mdGetWinSize          ) ( int nDevHandle, int far * Width, int far * Height );
  402.  
  403. extern void  ( WINAPI * mdGetVideoWinPos      ) ( int nDevHandle, int far * XPos, int far * YPos );
  404. extern void  ( WINAPI * mdGetVideoWinSize     ) ( int nDevHandle, int far * Width, int far * Height );
  405.  
  406. extern void  ( WINAPI * mdGetCtrlWinPos       ) ( int nDevHandle, int far * XPos, int far * YPos );
  407. extern void  ( WINAPI * mdGetCtrlWinSize      ) ( int nDevHandle, int far * Width );
  408. // ************************************
  409.  
  410. extern int   ( WINAPI * mdGetWinX             ) ( int nDevHandle );
  411. extern int   ( WINAPI * mdGetWinY             ) ( int nDevHandle );
  412. extern int   ( WINAPI * mdGetWinWidth         ) ( int nDevHandle );
  413. extern int   ( WINAPI * mdGetWinHeight        ) ( int nDevHandle );
  414.  
  415. extern int   ( WINAPI * mdGetVideoWinX        ) ( int nDevHandle );
  416. extern int   ( WINAPI * mdGetVideoWinY        ) ( int nDevHandle );
  417. extern int   ( WINAPI * mdGetVideoWinWidth    ) ( int nDevHandle );
  418. extern int   ( WINAPI * mdGetVideoWinHeight   ) ( int nDevHandle );
  419.  
  420. extern int   ( WINAPI * mdGetCtrlWinX         ) ( int nDevHandle );
  421. extern int   ( WINAPI * mdGetCtrlWinY         ) ( int nDevHandle );
  422. extern int   ( WINAPI * mdGetCtrlWinWidth     ) ( int nDevHandle );
  423.  
  424. extern int   ( WINAPI * mdGetAreaClicked      ) ( int nDevHandle );  
  425.  
  426. extern int   ( WINAPI * mdGetOpenFileCount    ) ( void );
  427.                                                                        
  428. extern int   ( WINAPI * mdGetFrameRate        ) ( int nDevHandle );
  429.  
  430. extern int   ( WINAPI * mdGetPlayedStatus     ) ( int nDevHandle );
  431.  
  432. extern int   ( WINAPI * mdGetVolumeLevel      ) ( int nDevHandle );
  433.  
  434. extern int   ( WINAPI * mdGetVideoImage       ) ( int nDevHandle, LPSTR lpszFileName );
  435.  
  436. extern void  ( WINAPI * mdGetOrigVideoWinSize ) ( int nDevHandle, int far * Width, int far * Height );
  437.  
  438. extern int   ( WINAPI * mdGetFileName         ) ( int nDevHandle, LPSTR lpszFileName, int nMaxLen );
  439.  
  440. extern long  ( WINAPI * mdGetFramesSkipped    ) ( int nDevHandle );
  441.  
  442. extern void  ( WINAPI * mdGetClipFrames       ) ( int nDevHandle, DWORD far * lpBegFrame, DWORD far * lpEndFrame );
  443.  
  444. extern void  ( WINAPI * mdGetPosClicked       ) ( int nDevHandle, LPINT lpnXPos, LPINT lpnYPos );
  445. extern int   ( WINAPI * mdGetXPosClicked      ) ( int nDevHandle );
  446. extern int   ( WINAPI * mdGetYPosClicked      ) ( int nDevHandle );
  447.  
  448. extern long  ( WINAPI * mdGetVersion          ) ( void );    
  449.  
  450. extern BOOL  ( WINAPI * mdGetVideoPalette     ) ( void );
  451.  
  452.  
  453. /* ********************************************************************** */
  454. /* ***   Prototypes:   Graphic Loading and Displaying Functions (7)   *** */ 
  455. /* ********************************************************************** */
  456. extern int   ( WINAPI * mdShowGraphic       ) ( int nDevHandle, BOOL bUsePalette );
  457. extern int   ( WINAPI * mdShowGraphicPos    ) ( int nDevHandle, int nXPosIn, int nYPosIn, int nWidthIn, int nHeightIn, BOOL bUsePalette );
  458. extern int   ( WINAPI * mdOpenGraphic       ) ( int nDevHandle, LPSTR FileNameIn );
  459. extern int   ( WINAPI * mdOpenGraphicKeep   ) ( int nDevHandle, LPSTR FileNameIn );
  460. extern void  ( WINAPI * mdCloseGraphic      ) ( int nDevHandle );
  461. extern void  ( WINAPI * mdHideGraphic       ) ( int nDevHandle );
  462. extern BOOL  ( WINAPI * mdDisplayGraphic    ) ( int nDevHandle, LPSTR lpszBMFileNameIn, int nX, int nY, BOOL bUsePalette );
  463.  
  464.  
  465. /* ********************************************************************** */
  466. /* ***      Prototypes:   Cursor Setting Functions  (6)               *** */ 
  467. /* ********************************************************************** */
  468. extern void ( WINAPI * mdSetCursor          ) ( int nCursorNo );
  469. extern void ( WINAPI * mdSetVideoCursor     ) ( int nCursorNo );
  470. extern void ( WINAPI * mdSetCtrlCursor      ) ( int nCursorNo );
  471. extern void ( WINAPI * mdResetCursor        ) ( void );
  472. extern void ( WINAPI * mdResetVideoCursor   ) ( void );
  473. extern void ( WINAPI * mdResetCtrlCursor    ) ( void );
  474.  
  475.  
  476. /* ********************************************************************** */
  477. /* ***      Prototypes: Miscellaneous Functions (9)                   *** */ 
  478. /* ********************************************************************** */
  479. extern void  ( WINAPI * mdTimedDelay       ) ( float fSeconds );
  480. extern BOOL  ( WINAPI * mdFileDoesNotExist ) ( LPSTR lpszFileToCheck );
  481. extern BOOL  ( WINAPI * mdFileDoesExist    ) ( LPSTR lpszFileToCheck );
  482. extern void  ( WINAPI * mdDisplayErrorMsgs ) ( BOOL bErrMsgFlag );
  483. extern void  ( WINAPI * mdAbout            ) ( void );
  484. extern DWORD ( WINAPI * mdMCISendString    ) ( int nDevHandle, LPSTR lpszSendString );
  485. extern int   ( WINAPI * mdCDEject          ) ( void );
  486. extern BOOL  ( WINAPI * mdSetupPlayStateCallback    ) ( HCTL hctl, int hVidHandle, FARPROC vbvFirePlayStateEvent );
  487. extern BOOL  ( WINAPI * mdSetupCustBtnClickCallback ) ( int hVidHandle, FARPROC vbvFireCustBtnClickEvent );
  488.  
  489.  
  490. /* ********************************************************************** */
  491. /* ***      Prototypes:   Audio Record Procedures  (5)                *** */ 
  492. /* ********************************************************************** */
  493. extern DWORD ( WINAPI * mdWaveRecordInit) ( void );
  494. extern DWORD ( WINAPI * mdWaveClose) ( void );
  495. extern DWORD ( WINAPI * mdWaveRecord) ( DWORD dwMilliSeconds, BOOL bModal );
  496. extern DWORD ( WINAPI * mdWaveRecordSave) ( LPSTR lpszFileName );
  497. extern DWORD ( WINAPI * mdWaveRecordPlayback) ( void );
  498.  
  499.  
  500. /* ********************************************************************** */
  501. /* ***      Prototypes:     Secure A/V Functions  (3)                 *** */ 
  502. /* ********************************************************************** */
  503. extern BOOL ( WINAPI * mdRemoveAllSecureAVDrivers ) ( void );
  504. extern int  ( WINAPI * mdInstallSecureAVDriver    ) ( LPSTR lpszFileExt, LONG lKeyValue1, LONG lKeyValue2 );
  505. extern int  ( WINAPI * mdRemoveSecureAVDriver     ) ( LPSTR lpszFileExt );
  506.  
  507. /* ********************************************************************** */
  508. /* ***      Prototypes:     Error Handling  (3)                       *** */ 
  509. /* ********************************************************************** */
  510. extern int  ( WINAPI * mdGetErrorNumber   ) ( int nDevHandle, int nInfoNo );
  511. extern void ( WINAPI * mdGetErrorText     ) ( int nErrorNo, LPSTR lpszStringOut, int nStringLen );
  512. extern int  ( WINAPI * mdLogErrors        ) ( LPSTR lpszErrorLogFileName, BOOL bLogErrors );
  513.  
  514. /* ********************************************************************** */
  515. /* ***      Prototypes:     Forced Shutdown/Load  (2)                 *** */ 
  516. /* ********************************************************************** */
  517. extern int ( WINAPI * mdCloseLibrary) ( void ); 
  518. extern int ( WINAPI * mdOpenLibrary ) ( void );
  519.   
  520.  
  521. extern HINSTANCE mhInstMDCtrl;
  522.  
  523. #endif
  524.  
  525. /* ********************************************************************** */
  526. /* ***      Prototypes:      Control Functions   (12)                 *** */ 
  527. /* ********************************************************************** */
  528. #define MDOPEN                      "mdOpen"    
  529. #define MDOPENLITE                  "mdOpenLite"
  530. #define MDCLOSE                     "mdClose"
  531. #define MDPLAY                      "mdPlay"
  532. #define MDPAUSE                     "mdPause"
  533. #define MDSTEP                      "mdStep"
  534. #define MDSTOP                      "mdStop"
  535. #define MDGOTOFRAME                 "mdGotoFrame"
  536. #define MDREWIND                    "mdRewind"
  537. #define MDRESTART                   "mdRestart"
  538.  
  539. #define MDOPENDEVICE                "mdOpenDevice"
  540. #define MDCLOSEDEVICE               "mdCloseDevice"
  541.  
  542.  
  543. /* ********************************************************************** */
  544. /* ***      Prototypes:      Custom Control Functions  (4)            *** */ 
  545. /* ********************************************************************** */
  546. #define MDCLOSEINTERFACE            "mdCloseInterface"
  547. #define MDOPENINTERFACE             "mdOpenInterface"
  548. #define MDGETBUTTONCLICKED          "mdGetButtonClicked"
  549. #define MDSETINTERFACENO            "mdSetInterfaceNo"
  550.  
  551.  
  552. /* ********************************************************************** */
  553. /* ***      Prototypes:      Visual Basic Specific (1)                *** */ 
  554. /* ********************************************************************** */
  555. #define MDVBVOPEN                   "mdVBVOpen"
  556.  
  557.  
  558. /* ********************************************************************** */
  559. /* ***      Prototypes:      Window Control Functions   (6)           *** */ 
  560. /* ********************************************************************** */
  561. #define MDHIDE                      "mdHide"
  562. #define MDSHOW                      "mdShow"
  563. #define MDHIDEVIDEO                 "mdHideVideo"
  564. #define MDSHOWVIDEO                 "mdShowVideo"
  565. #define MDHIDECTRL                  "mdHideCtrl"
  566. #define MDSHOWCTRL                  "mdShowCtrl"
  567.  
  568. /* ********************************************************************** */
  569. /* ***      Prototypes: Parameter Setting Functions  (26)             *** */ 
  570. /* ********************************************************************** */
  571. #define MDSETCLIP                   "mdSetClip"    
  572. #define MDSETWINPOS                 "mdSetWinPos"
  573. #define MDSETWINSIZE                "mdSetWinSize"
  574. #define MDSETVIDEOWINPOS            "mdSetVideoWinPos"
  575. #define MDSETVIDEOWINSIZE           "mdSetVideoWinSize"
  576. #define MDSETCTRLWINPOS             "mdSetCtrlWinPos"
  577. #define MDSETCTRLWINSIZE            "mdSetCtrlWinSize"  
  578.  
  579. #define MDSETWINDOWMOVEABLE         "mdSetWindowMoveable"
  580. #define MDSETWINDOWINTERACTIVE      "mdSetWindowInteractive"
  581.  
  582. #define MDSETAUDIOLEVEL             "mdSetAudioLevel"
  583. #define MDSETAUDIOMUTE              "mdSetAudioMute"
  584.  
  585. #define MDSETCTRLTYPE               "mdSetCtrlType"
  586.  
  587. #define MDSETWINBOTTOM              "mdSetWinBottom"
  588. #define MDSETWINTOP                 "mdSetWinTop"
  589. #define MDSETNEWPARENT              "mdSetNewParent"
  590.  
  591. #define MDSETCLIPPINGREGION         "mdSetClippingRegion"  
  592.  
  593. #define MDSETVIDEOWINDOWASPECT      "mdSetVideoWindowAspect"
  594. #define MDSETVIDEOASPECT            "mdSetVideoAspect"
  595. #define MDSETVIDEOOFFSET            "mdSetVideoOffset"
  596.  
  597. #define MDSETVIDEOPALETTE           "mdSetVideoPalette" 
  598. #define MDSETKEYCOLOR               "mdSetKeyColor"
  599.  
  600. #define MDSETPLAYBACKSPEED          "mdSetPlaybackSpeed"
  601.  
  602. #define MDSETACTIVEPALETTE          "mdSetActivePalette"
  603.  
  604. #define MDSETPLAYREPEAT             "mdSetPlayRepeat"
  605.  
  606. #define MDSETTIMEFORMAT             "MdSetTimeFormat"
  607.  
  608. #define MDSETPARAMDIRECT            "mdSetParamDirect"
  609.  
  610. /* ********************************************************************** */
  611. /* ***      Prototypes:   Information Functions   (43)                *** */ 
  612. /* ********************************************************************** */
  613. #define MDGETFILETYPE               "mdGetFileType"
  614. #define MDGETWINDOWHANDLE           "mdGetWindowHandle"   
  615. #define MDGETCTRLWINDOWHANDLE       "mdGetCtrlWindowHandle"
  616. #define MDGETDEVICEID               "mdGetDeviceId"
  617. #define MDGETFRAME                  "mdGetFrame"
  618. #define MDGETCLIPFRAME              "mdGetClipFrame"
  619.  
  620. #define MDGETLENGTH                 "mdGetLength"
  621. #define MDGETCLIPLENGTH             "mdGetClipLength"
  622.  
  623. #define MDGETPLAYSTATE              "mdGetPlayState"
  624. #define MDGETDISPLAYSTATE           "mdGetDisplayState"
  625.  
  626. #define MDGETWINPOS                 "mdGetWinPos"
  627. #define MDGETWINSIZE                "mdGetWinSize"
  628.  
  629. #define MDGETVIDEOWINPOS            "mdGetVideoWinPos"
  630. #define MDGETVIDEOWINSIZE           "mdGetVideoWinSize"  
  631.  
  632. #define MDGETCTRLWINPOS             "mdGetCtrlWinPos"
  633. #define MDGETCTRLWINSIZE            "mdGetCtrlWinSize"
  634.  
  635. #define MDGETWINX                   "mdGetWinX"
  636. #define MDGETWINY                   "mdGetWinY"
  637. #define MDGETWINWIDTH               "mdGetWinWidth"
  638. #define MDGETWINHEIGHT              "mdGetWinHeight"
  639.  
  640. #define MDGETVIDEOWINX              "mdGetVideoWinX"
  641. #define MDGETVIDEOWINY              "mdGetVideoWinY"
  642. #define MDGETVIDEOWINWIDTH          "mdGetVideoWinWidth"
  643. #define MDGETVIDEOWINHEIGHT         "mdGetVideoWinHeight"
  644.  
  645. #define MDGETCTRLWINX               "mdGetCtrlWinX"
  646. #define MDGETCTRLWINY               "mdGetCtrlWinY"
  647. #define MDGETCTRLWINWIDTH           "mdGetCtrlWinWidth"
  648.  
  649. #define MDGETAREACLICKED            "mdGetAreaClicked"
  650.  
  651. #define MDGETOPENFILECOUNT          "mdGetOpenFileCount"
  652.  
  653. #define MDGETFRAMERATE              "mdGetFrameRate"
  654.  
  655. #define MDGETPLAYEDSTATUS           "mdGetPlayedStatus"
  656.  
  657. #define MDGETVOLUMELEVEL            "mdGetVolumeLevel"
  658.  
  659. #define MDGETVIDEOIMAGE             "mdGetVideoImage"
  660.  
  661. #define MDGETORIGVIDEOWINSIZE       "mdGetOrigVideoWinSize"
  662.  
  663. #define MDGETFILENAME               "mdGetFileName"
  664.  
  665. #define MDGETFRAMESSKIPPED          "mdGetFramesSkipped"
  666.  
  667. #define MDGETCLIPFRAMES             "mdGetClipFrames"
  668.  
  669. #define MDGETPOSCLICKED             "mdGetPosClicked"
  670. #define MDGETXPOSCLICKED            "mdGetXPosClicked"
  671. #define MDGETYPOSCLICKED            "mdGetYPosClicked"    
  672.  
  673. #define MDGETVIDEOPALETTE           "mdGetVideoPalette"
  674.  
  675. #define MDGETVERSION                "mdGetVersion"
  676.  
  677. /* ********************************************************************** */
  678. /* ***   Prototypes:   Graphic Loading and Displaying Functions (7)   *** */ 
  679. /* ********************************************************************** */
  680. #define MDSHOWGRAPHIC               "mdShowGraphic"
  681. #define MDSHOWGRAPHICPOS            "mdShowGraphicPos"
  682. #define MDOPENGRAPHIC               "mdOpenGraphic"
  683. #define MDOPENGRAPHICKEEP           "mdOpenGraphicKeep"
  684. #define MDCLOSEGRAPHIC              "mdCloseGraphic"
  685. #define MDHIDEGRAPHIC               "mdHideGraphic"
  686. #define MDDISPLAYGRAPHIC            "mdDisplayGraphic"
  687.  
  688. /* ********************************************************************** */
  689. /* ***      Prototypes:   Cursor Setting Functions  (6)               *** */ 
  690. /* ********************************************************************** */
  691. #define MDSETCURSOR                 "mdSetCursor"
  692. #define MDSETVIDEOCURSOR            "mdSetVideoCursor"
  693. #define MDSETCTRLCURSOR             "mdSetCtrlCursor"
  694. #define MDRESETCURSOR               "mdResetCursor"
  695. #define MDRESETVIDEOCURSOR          "mdResetVideoCursor"
  696. #define MDRESETCTRLCURSOR           "mdResetCtrlCursor"
  697.  
  698. /* ********************************************************************** */
  699. /* ***      Prototypes: Miscellaneous Functions (9)                   *** */ 
  700. /* ********************************************************************** */
  701. #define MDTIMEDDELAY                "mdTimedDelay"
  702. #define MDFILEDOESNOTEXIST          "mdFileDoesNotExist"
  703. #define MDFILEDOESEXIST             "mdFileDoesExist"
  704. #define MDDISPLAYERRORMSGS          "mdDisplayErrorMsgs"
  705. #define MDABOUT                     "mdAbout"
  706. #define MDMCISENDSTRING             "mdMCISendString"
  707. #define MDCDEJECT                   "mdCDEject"     
  708. #define MDSETUPPLAYSTATECALLBACK    "mdSetupPlayStateCallback"
  709. #define MDSETUPCUSTBTNCLICKCALLBACK "mdSetupCustBtnClickCallback"
  710.  
  711. /* ********************************************************************** */
  712. /* ***      Prototypes:   Audio Record Procedures  (5)                *** */ 
  713. /* ********************************************************************** */
  714. #define MDWAVERECORDINIT            "mdWaveRecordInit"
  715. #define MDWAVECLOSE                 "mdWaveClose"
  716. #define MDWAVERECORD                "mdWaveRecord"
  717. #define MDWAVERECORDSAVE            "mdWaveRecordSave"
  718. #define MDWAVERECORDPLAYBACK        "mdWaveRecordPlayback"
  719.                                     
  720. /* ********************************************************************** */
  721. /* ***      Prototypes:     Secure A/V Functions  (3)                 *** */ 
  722. /* ********************************************************************** */
  723. #define MDREMOVEALLSECUREAVDRIVERS  "mdRemoveAllSecureAVDrivers"
  724. #define MDINSTALLSECUREAVDRIVER     "mdInstallSecureAVDriver"
  725. #define MDREMOVESECUREAVDRIVER      "mdRemoveSecureAVDriver"
  726.  
  727.  
  728. /* ********************************************************************** */
  729. /* ***      Prototypes:     Error Handling  (3)                       *** */ 
  730. /* ********************************************************************** */
  731. #define MDGETERRORNUMBER            "mdGetErrorNumber"
  732. #define MDGETERRORTEXT              "mdGetErrorText"
  733. #define MDLOGERRORS                 "mdLogErrors"
  734.  
  735.  
  736. /* ********************************************************************** */
  737. /* ***      Prototypes:     Forced Shutdown/Load  (2)                 *** */ 
  738. /* ********************************************************************** */
  739. #define MDCLOSELIBRARY              "mdCloseLibrary"
  740. #define MDOPENLIBRARY               "mdOpenLibrary"
  741.